package com.realgodo.site.entity.application.favorite;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;

import com.realgodo.site.entity.application.Application;
import com.realgodo.site.entity.application.show.Show;

/**
 * @author bijiqiang E-mail: bijiqiang@gmail.com
 * @version 创建时间：2009-12-13下午12:11:47
 * @since jdk1.5
 * @version 0.1
 */
@Entity(name = "Favorite")
@Table(name = "favorite")
@Inheritance(strategy = InheritanceType.JOINED)
@PrimaryKeyJoinColumn(name = "id", referencedColumnName = "id")
public class Favorite extends Application {

	private static final long serialVersionUID = 2859872038105252061L;

	private String name;

	private Show show;

	@Column(name = "name")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@ManyToOne
	@JoinColumn(name = "show_id", referencedColumnName = "id", nullable = false)
	public Show getShow() {
		return show;
	}

	public void setShow(Show show) {
		this.show = show;
	}

}
